export type User = {
    id:string,
    email:string,
    username:string,
    password:string
}
export type Page = {
    pageSize:number,
    currentPage:number
}
export type SpuSearchParams = {
    name: string,
    pager: Page
}

//spu
export type SpuItem = {
   created_at:string,
   updated_at:string,
   description:string,
   id:string,
   name:string,
   skus:Sku[],
   spu_params_temp:SpuTemplate[]
}

export type Sku = {
   created_at:string,
   updated_at:string,
   id:string,
   images:string,
   params:Param[],
   spu_id:string,
   name:string,
   price:number,
   stock:number
}

/**
 * Sku参数
 */

export type Param = {
    id:string,
    name:string,
    paramType:string,
    skuId:number,
    value:string
}
/**
 * Spu参数模板
 */
export type SpuTemplate = {
  id:string,
  name:string,
  paramType:string
}

/**
 * 商品
 */
export type Produt = {
    id:string,
    name:string,
    description:string,
    created_at:string,
    updated_at:string
}